/**
* @(#)com.pylc.model.dao.impl.MemberDaoImpl.java
* 
* @date 2012-6-17
*/
package com.pylc.model.dao.impl;

import com.pylc.model.dao.MemberDao;
import com.pylc.model.entity.Member;
import com.pylc.model.entity.Store;

import java.util.List;

/** 
 * 
 * @author <a href="mailto:yuanyichen@gmail.com">（H0rol4</a>
 * @version 1.0 
 */

public class MemberDaoImpl extends BaseDaoImpl<Member, Long> implements MemberDao {

	public Store getStore(Integer memberId) {
		String hql = "from Store store where store.member.id = ?";
        List<Store> storeList = (List<Store>) getHibernateTemplate().find(hql, new Object[]{memberId});
        return (storeList != null && storeList.size() > 0) ? storeList.get(0) : null;
	}
}
